<template>
	<view class="v-home-page">
		<block v-if="isPrivacy">
			<xh-privacy title="隐私保护指引" theme="direction" @onHandleAgree="onHandle" background="rgba(0, 0, 0, .5)"
				color="#0055ff"></xh-privacy>
		</block>
		<view :style="{ height: heightSystemss+Number(10) + 'rpx' }"></view>
		<!-- 搜索框 -->
		<view class="search-content flex-start-center" @click="search()">

			<uni-icons style="margin-left: 20rpx;" color="#fff" type="search" size="24"></uni-icons>

			<!-- <image style="margin-left: 20rpx;" src="/static/sousuo.jpg"></image> -->
			<view>请搜索需要的软件</view>
		</view>
		<view id="barTitle" :style="{ opacity: opacityStyle, height: heightSystemss+Number(50) + 'px' }"
			v-show="!hiddenModel">
			<text>首页</text>
		</view>

		<!-- 轮播图 -->
		<swiper v-if="carousel" autoplay="true" class="i-cover" :circular="true">
			<swiper-item v-for="(item, index) in carousel" :key="index">
				<image class="i-cover-img" :src="item.pic_url"></image>
			</swiper-item>
		</swiper>


		<!-- 分类 -->
		<view class="flex-align-center classContianer">
			<block v-for="(item, index) in classList" :key="index">
				<view class="flex-column v-class" @click="toGo(item)">
					<image :src="item.pic_url"></image>
					<text>{{ item.name }}</text>
				</view>
			</block>
		</view>
		<view class="flex-between" :class="linkcss">
			<block v-for="(i, j) in linkList" :key="j">
				<image :src="i.img" @click="imgClick(i)"></image>
			</block>
		</view>
		<!-- 	<block v-if="groupList.length > 0">
			<view class="v-group-title flex-between">
				<view>团购专区</view>
				<text @click="getMoreGroup()">查看更多 ></text>
			</view>
			
			<shop :list="groupList"></shop>
		</block> -->
		<uv-skeletons :loading="loading" :skeleton="skeleton" :animate="animate">
			<view class="dailyFlashSale ">
				<!-- <view class="flex-between">
				<view class="flex-start-center">

					<image class="fireSell" src="../../static/会员卡营销用户端/今日疯抢.png" mode="scaleToFill"></image>
					<cc-countdown style="margin-left: 10rpx;" color="#FFF" background-color="red" splitorColor="red"
						:showColon="true" :showDay="false" :day="0" :hour="24" :minute="0" :second="0"
						@timeup="timeup"></cc-countdown>
				</view>
				<sunui-navbar style="width: 300rpx;" v-if="tabList.length>=1" :items="tabList" lineHeight="0rpx"
					:isCenter="true" :currentIndex="navIndex" padding="2rpx" activeColor="rgb(0, 0, 0)" :size="70"
					activeLineBg="rgb(255, 0, 0)" textAlign="center" activeLineWidth="100%"
					activeDirection="space-between" activeLineHeight="0rpx" bgColor="transparent" :margin="30"
					@change="getChange"></sunui-navbar>

			</view> -->

				<view class="dailyFlashSaleList flex-columns " v-if="recommendGrouponBol||recommendSeckillBol||recommendBargainsBol">
					<view class="flex-between padding_30rpx_0">
						<view class=" flex-start-center">
							<image class="iconFont" :src="activeArea" mode="scaleToFill"></image>


						</view>
						<view style="color: #fff;" @click="viewActivities()">
							查看更多
							<uni-icons color="#fff" type="right" size="15"></uni-icons>
						</view>
					</view>
					<block v-if="recommendGrouponBol">
						<view class="flex-around" @click="joinActivities(1,recommendGroupon.id)"
							style="margin-bottom: 20rpx;border-radius: 20rpx; background-color: #fff;padding: 15rpx ;">
							<view class="dailyFlashSaleContainer">
								<image class="dailyFlashSaleImg" style="margin-right: 10rpx; "
									:src="recommendGroupon.pic_url" mode="scaleToFill">
								</image>

								<!-- <text>团购</text> -->
								<image class="triangleText" src="../../static/my/组合 3055.png" mode="aspectFit"></image>

							</view>
							<view class="" style="height: 222rpx;">
								<view style="width: 450rpx;" class="font-overflow  flex-between">
									<text
										style="font-weight: 700;width: 329rpx;overflow: hidden;font-size: 33rpx;">{{recommendGroupon.goods_name}}</text>
									<view class="joinGroupBtn flex margin-right_16rpx">
										<text class="font-size_24rpx">{{recommendGroupon.max_number}}人团</text>
									</view>
								</view>



								<view class="flex-between " style="margin-top: 26rpx;">
									<view class="">

										<view class="flex-start-center">

											<cc-countdown style="" color="#FFF" background-color="#ef3c2e"
												splitorColor="red" :showColon="true" :showDay="true"
												:day="timeDifference.days" :hour="timeDifference.hours"
												:minute="timeDifference.minutes" :second="timeDifference.seconds"
												@timeup="timeup"></cc-countdown>
										</view>



										<view style="color: rgb(255, 0, 0); margin-top: 55rpx;"
											class="font-weight rob flex-start-center">
											团购价:￥{{recommendGroupon.money}}
										</view>

									</view>
									<view class="activeBtn flex">
										<text class="font-size_24rpx">立即参团</text>
									</view>
								</view>



							</view>
						</view>

					</block>
					<block v-if="recommendSeckillBol">
						<view class="flex-around" @click="joinActivities(2,recommendSeckill.id)"
							style="margin-bottom: 20rpx;border-radius: 20rpx; background-color: #fff;padding: 15rpx ;">
							<view class="dailyFlashSaleContainer">
								<image class="dailyFlashSaleImg" style="margin-right: 10rpx; "
									:src="recommendSeckill.pic_url" mode="scaleToFill">
								</image>

								<!-- <view class="text flex font-size_22rpx">
									秒杀
								</view> -->
								<image class="triangleText" src="../../static/my/组合 3054.png" mode="aspectFit"></image>

							</view>
							<view class="" style="height: 219rpx;">
								<view style="width: 450rpx;" class="font-overflow ">
									<text
										style="font-weight: 700;font-size: 33rpx;">{{recommendSeckill.goods_name}}</text>
								</view>



								<view class="flex-between" style="height: 200rpx;">
									<view class="">

										<ai-progress v-if="recommendSeckill"
											:percentage="Number(recommendSeckill.inventory)" :is-animate="true"
											:totalNum="Number(Number(recommendSeckill.inventory)+Number(recommendSeckill.sold))"
											duration="3000"></ai-progress>

										<view class="font-size_26rpx"
											style="width: 300rpx;color: #545454;margin-top: 5rpx;">
											剩余名额:{{recommendSeckill.inventory}}位 </view>

										<view style="color: rgb(255, 0, 0); margin-top: 40rpx;"
											class="font-weight rob flex-start-center">
											￥{{recommendSeckill.money}}
											<image class="imgShrare margin-left_16rpx" src="../../static/my/组合 3056.png"
												mode=""></image>
											<text style="color: #EF3C2E ;font-weight: 400;margin-left: 5rpx;"
												class="font-size_22rpx ">降￥{{Number(recommendSeckill.price)-Number(recommendSeckill.money)}}</text>
										</view>

									</view>
									<view class="activeBtn flex">
										<text class="font-size_24rpx">立即抢购</text>
									</view>
								</view>



							</view>
						</view>

					</block>
					<block v-if="recommendBargainsBol">
						<view class="flex-around" @click="joinActivities(3,recommendBargains.id)"
							style="margin-bottom: 20rpx;border-radius: 20rpx; background-color: #fff;padding: 15rpx ;">
							<view class="dailyFlashSaleContainer">
								<image class="dailyFlashSaleImg" style="margin-right: 10rpx; "
									:src="recommendBargains.pic_url" mode="scaleToFill">
								</image>

								<!-- 	<view class="trafficText flex font-size_22rpx">
									限行砍价
								</view> -->
								<image class="triangleText" src="../../static/my/组合 3053.png" mode="aspectFit"></image>
							</view>
							<view class="" style="height: 222rpx;">
								<view style="width: 450rpx;" class="font-overflow margin-bottom_20rpx">
									<text
										style="font-weight: 700;font-size: 33rpx;">{{recommendBargains.goods_name}}</text>
								</view>



								<view class="flex-around">
									<view class="" style="margin-top: 6rpx;">


										<view style="color: #EF3C2E ;" class="font-size_24rpx ">
											最低砍到￥{{recommendBargains.money}}(元)
										</view>

										<view style="color: rgb(255, 0, 0); margin-top: 70rpx;"
											class="font-weight rob flex-start-center">
											原价￥{{recommendBargains.price}}
										</view>
									</view>
									<view class="activeBtn flex">
										<text class="font-size_24rpx">发起砍价</text>
									</view>
								</view>



							</view>
						</view>

					</block>

				</view>


			</view>
			<view style="background-color: #fff;
			padding: 8rpx;
			border-radius: 20rpx;
			margin: 18rpx; ">
				<image class="v-titless" :src="TodayRecommendation" mode="scaleToFill"></image>
				<!-- <view class="v-titless" v-if="hotList.length > 0">今日推荐</view> -->
				<view class="flex-wrap v-m-top" style="margin: 0rpx 0;">
					<block v-for="(i, j) in hotList" :key="j">
						<view class="" v-if="j<3">
							<view class="v-commodityss" @click="toDetail(i.id)" style="width: 222rpx;">
								<image class="border10" :src="i.pic_url" style="width: 222rpx;height: 222rpx;"></image>
								<view class="font-overflow">{{ i.name }}</view>
								<view class="flex-between">
									<view class="v-price2" style="margin-top: 10rpx;">
										￥
										<text>{{ i.money }}</text>
									</view>
								</view>
							</view>
						</view>
					</block>
				</view>
			</view>



			<!-- <view class="popularRecommendations ">

			<view class="flex-between">
				<view class=" flex-start-center">

					<view class="v-titles" v-if="hotList.length > 0">热门推荐</view>

				</view>
				<view style="color: #fff;">
					查看更多
					<uni-icons color="#fff" type="right" size="15"></uni-icons>
				</view>
			</view>
			<scroll-view @scrolltolower="nextPage" scroll-view scroll-with-animation='true' :scroll-into-view="toView"
				class="scroll-view_H" scroll-x="true">

				<view class="flex-start-center v-m-tops">
					<block v-for="(i, j) in hotList" :key="j">
						<view style="padding-left: 18rpx;">
							<view class="v-commoditys" @click="toDetail(i.id)" style="width: 230rpx;">
								<view class="imgPopular">
									<image class="border10" :src="i.foods_img"
										style="width: 100%;height: 262rpx;border-radius: 20rpx;" mode="aspectFill">
									</image>
									<view
										:style="{ '--bg-image': `linear-gradient(180deg, ${j==0?startColor:j==1?startColor1:startColor2} -3.5%, ${j==0?endColor:j==1?endColor1:endColor2} 46%)` }"
										class="gradient padding_0_10rpx" style="padding-top: 86rpx; ">
										<view class="font-overflow" style="color: #fff;">{{ i.foods_name }}</view>

										<view class="buyBt flex font-size_24rpx margin-top_20rpx">立即购买</view>
									</view>
								</view>
							

							</view>
						</view>
					</block>
				</view>
			</scroll-view>
		</view> -->

			<!-- 新品+人气热卖 -->
			<mescroll-body ref="mescrollRef" :height="windowHeight+'rpx'" @init="mescrollInit" :down="downOption"
				@down="downCallback" @up="upCallback">

				<view v-if="Number(typeList.length) > 0"
					class="flex-between padding_0_20rpx margin-top_20rpx margin-bottom_20rpx">

					<sunui-navbar activeFontWeight="900" :items="tabList" :currentIndex="navIndex" padding="20rpx"
						:size="150" activeFontSize="30rpx" fontSize="30rpx" activeLineWidth="100%"
						activeLineBg="#785DF6" textAlign="center" activeDirection="space-between"
						activeLineHeight="8rpx" activeColor="#000000" divImg='/static/直线5.png'
						@change="getChange()"></sunui-navbar>

					<view style="color: #8B8B8B;" @click="Allclassification()">
						查看更多
						<uni-icons color="#8B8B8B" type="right" size="15"></uni-icons>
					</view>
				</view>
				<!-- "热门推荐 / 人气热卖" 分类 -->
				<view class="flex-wrap v-m-top">
					<block v-for="(i, j) in typeList.slice(0, 8)" :key="j">
						<view class="v-commodity" @click="toDetail(i.id)">
							<image :src="i.pic_url" class="border20"></image>

							<!-- <view class="flex-align-center v-commission" v-if="distributionSet.distribution_level != 0">
							<view>{{ i.commission > 0 ? '预估佣金￥' + i.commission : '暂无佣金' }}</view>
						</view> -->

							<view class="padding_0_10rpx">
								<view class="v-fontsize30 font-overflow2 " style="width: 98%;height: 70rpx;">
									{{ i.name }}
								</view>
								<view class="flex-between">
									<view class="v-price">
										￥
										<text>{{ i.money }}</text>
									</view>
									<view class="flex-align-center v-sale">
										<view>销售{{ i.sold>=10 ?totelName(i.sold) : '<10' }}</view>
									</view>

								</view>
								<button v-if="user.is_partner==0" open-type="share"
									:style="{width: Number(i.level_one) > 0?'90%':'200rpx'} " class="v-btn-shareing "
									@click.stop="shareShop(i)">
									<view class="v-shareing flex-align-center">
										<text class="iconfont size20">&#xe624;</text>
										<view class="flex" v-if="i.brokerage_type==1">
											{{Number(i.level_one) > 0 ? '预估佣金￥' +i.level_one : '暂无佣金' }}<uni-icons
												color="#fe9a31" type="right" size="12"></uni-icons>
										</view>
										<view class="flex" v-if="i.brokerage_type==2">
											<text>{{(Number(i.money)* Number(i.level_one)*0.01) > 0 ? '预估佣金￥' +(Number(i.money)* Number(i.level_one)*0.01).toFixed(2) : '暂无佣金' }}</text><uni-icons
												color="#fe9a31" type="right" size="12"></uni-icons>
										</view>
									</view>
								</button>
								<button v-else-if="user.is_partner==1" open-type="share"
									:style="{width: Number(i.level_one_partner) > 0?'90%':'200rpx'}"
									class="v-btn-shareing " @click.stop="shareShop(i)">
									<view class="v-shareing flex-align-center">
										<text class="iconfont size20">&#xe624;</text>
										<view class="flex" v-if="i.brokerage_type_partner==1">
											{{Number(i.level_one_partner) > 0 ? '预估佣金￥' +i.level_one_partner : '暂无佣金' }}<uni-icons
												color="#fe9a31" type="right" size="12"></uni-icons>
										</view>
										<view class="flex" v-if="i.brokerage_type_partner==2">
											<text>{{(Number(i.money)* Number(i.level_one_partner)*0.01) > 0 ? '预估佣金￥' +(Number(i.money)* Number(i.level_one_partner)*0.01).toFixed(2) : '暂无佣金' }}</text><uni-icons
												color="#fe9a31" type="right" size="12"></uni-icons>
										</view>
									</view>
								</button>
								<button v-else open-type="share"
									:style="{width: Number(i.level_one) > 0?'90%':'200rpx'}" class="v-btn-shareing "
									@click.stop="shareShop(i)">
									<view class="v-shareing flex-align-center">
										<text class="iconfont size20">&#xe624;</text>

										<view class="flex">
											<text>预估佣金xxxxxx</text><uni-icons color="#fe9a31" type="right"
												size="12"></uni-icons>
										</view>
									</view>
								</button>
							</view>
						</view>
					</block>
				</view>
			</mescroll-body>
		</uv-skeletons>
		<!-- 流量主广告 -->
		<advertisement :isIndex="1" ref="index"></advertisement>
		<!-- 定位 ‘分享’ 图标 -->
		<view class="flex-column v-fixed">
			<!--  open-type="contact" @contact="handleContact" -->
			<button class="btncss" style="background-color: rgb(85 0 0 / 0%);" @click="kfFn()">
				<view class="flex-column v-icon">
					<image src="/static/customerService.png"></image>
					<view>客服</view>
				</view>
			</button>
			<view class="flex-column v-icon2" @click="popClick()">
				<image src="/static/eram.png"></image>
				<view>进群</view>
			</view>
		</view>

		<view class="bottom-border"></view>
		<!-- 二维码 -->
		<sunui-popup ref="popCode">
			<template v-slot:content>
				<view class="v-pop-code">
					<view class="flex-column v-qr-code">
						<image :show-menu-by-longpress="true" :src="kfImg" @click="previewImage"></image>
						<text>扫一扫或长按保存扫码进群</text>
					</view>
					<view class="flex" @click="popCodeClose">
						<image class="v-close-img" src="/static/close.png"></image>
					</view>
				</view>
			</template>
		</sunui-popup>
		<sunui-popup ref="pop">
			<template v-slot:content>
				<view class="v-pop flex-column">
					<view class="v-pop-phone flex" @click="call()">
						<image src="/static/my/phone.png"></image>
						{{ kfPhone }}
					</view>
					<view class="v-cancel flex" @click="cancel()">取消</view>
				</view>
			</template>
		</sunui-popup>
		<view class="height50">

		</view>
		<sunui-tabbar :fixed="true" :current="0"></sunui-tabbar>
		<!-- <uv-tabbar :value="value" @change="change" >
			<uv-tabbar-item text="首页">
				<template v-slot:active-icon>
					<image style="height: 50rpx; width: 50rpx;" class="icon" src="/static/tabbar/蒙版-1.png"></image>

				</template>
				<template v-slot:inactive-icon>
					<image style="height: 50rpx; width: 50rpx;" class="icon" src="/static/tabbar/蒙版.png"></image>
				</template>
			</uv-tabbar-item>
			<uv-tabbar-item text="活动">
				<template v-slot:active-icon>
					<image style="height: 50rpx; width: 50rpx;" class="icon" src="/static/tabbar/蒙版-3.png"></image>
			
				</template>
				<template v-slot:inactive-icon>
					<image style="height: 50rpx; width: 50rpx;" class="icon" src="/static/tabbar/蒙版-2.png"></image>
				</template>
			</uv-tabbar-item>
			<uv-tabbar-item text="推广" v-if="brokerageSetObj.is_open == 1">
				<template v-slot:active-icon>
					<image style="height: 50rpx; width: 50rpx;" class="icon" src="/static/tabbar/蒙版-7.png"></image>
			
				</template>
				<template v-slot:inactive-icon>
					<image style="height: 50rpx; width: 50rpx;" class="icon" src="/static/tabbar/蒙版-6.png"></image>
				</template>
			</uv-tabbar-item>
			<uv-tabbar-item text="我的">
				<template v-slot:active-icon>
					<image style="height: 50rpx; width: 50rpx;" class="icon" src="/static/tabbar/蒙版-5.png "></image>
			
				</template>
				<template v-slot:inactive-icon>
					<image style="height: 50rpx; width: 50rpx;" class="icon" src="/static/tabbar/蒙版-4.png"></image>
				</template>
			</uv-tabbar-item>
		
		</uv-tabbar> -->
	</view>
</template>

<script>
	function unparam(str = '', unDecodeURI) {
		let result = {};
		let arr = str.split('&');
		arr.forEach((item, idx) => {
			let param = item.split('='),
				name = param[0],
				value = param[1] || '';
			if (name) {
				result[name] = unDecodeURI ? value : decodeURIComponent(value);
			}
		});

		return result;
	}

	import aiProgress from '@/components/ai-progress/ai-progress.vue'
	export default {
		components: {
			aiProgress
		},

		data() {

			return {
				value: 0,
				options: {},
				isPrivacy: uni.getStorageSync("privacy") ? false : true,
				kfPhone: uni.getStorageSync('kfSet').kf_phone,
				user: uni.getStorageSync('user') ? uni.getStorageSync('user') : '',
				activeArea: this.$imgs.activeArea,
				TodayRecommendation: this.$imgs.TodayRecommendation,
				recommendBargains: {},
				recommendGroupon: {},
				recommendSeckill: {},
				recommendBargainsBol:true,
				recommendGrouponBol:true,
				recommendSeckillBol:true,
				uid: uni.getStorageSync('uid'),
				startColor: 'rgba(133, 102, 240, 0)', // 起始颜色
				endColor: 'rgb(133, 102, 240)',
				startColor1: ' rgba(61, 103, 247, 0)', // 起始颜色
				endColor1: 'rgb(61, 103, 247)',
				startColor2: 'rgba(133, 102, 240, 0)', // 起始颜色
				endColor2: 'rgb(85, 163, 246)',
				heightSystemss: 0,
				indexAdid: '',
				hotList: [],
				// 系统设置:客服二维码
				kfImg: '',
				distributionSet: {},
				pid: uni.getStorageSync('pid') ? uni.getStorageSync('pid') : '',
				// pid: 0,
				// 轮播图
				carousel: [],
				systemInfo: {},
				// 行业分类
				classList: [],
				// 左右分类
				linkList: [],
				// ‘左右分类’样式
				linkcss: 'v-not-link',
				// 团购专区
				groupList: [],
				typeList: [],
				navIndex: 0,
				windowHeight: 0,

				tabList: [{
						name: '新品发布',
						id: 2
					},
					{
						name: '人气热卖',
						id: 2
					}
				],
				// 分享商品信息
				detailInfo: {},
				// 测试流量主广告 start
				a1: '',
				a2: '',
				a3: '',
				errDetail: {},
				// end
				uid: uni.getStorageSync('uid'),
				scrollTop: 0, //滚动距离
				hiddenModel: true, //显示影藏
				opacityStyle: 0, //透明度
				navH: 0, // 声明一个变量
				batTitle: '自定义小程序标题栏', //头部标题
				heightStyle: 70,
				queryPage: {
					limit: 10,
					page: 1

				},
				total: 10,
				kfImg: uni.getStorageSync('kfSet').kf_qrcode,
				timeDifference: {},
				loading: true,
				animate: true,
				detailInfo: {},
				allActivity: {},
				skeleton: [{
						type: 'flex',
						num: 1,
						children: [{
							type: 'custom',
							num: 1,
							style: 'width:136rpx;height:136rpx;marginRight: 30rpx;background-color: #fff'
						}, {
							type: 'line',
							num: 3,
							style: [null, 'width:360rpx;', 'width:200rpx;', 'background-color: #fff']
						}]
					},
					30, {
						type: 'flex',
						children: [{
							type: 'custom',
							style: 'width:198rpx;height:160rpx;background-color: #fff'
						}, {
							type: 'custom',
							style: 'width:198rpx;height:160rpx;marginLeft:50rpx;background-color: #fff'
						}, {
							type: 'custom',
							style: 'width:198rpx;height:160rpx;marginLeft:50rpx;background-color: #fff'
						}, ]
					},
					30, {
						type: 'flex',
						children: [{
							type: 'custom',
							style: 'width:198rpx;height:160rpx;background-color: #fff'
						}, {
							type: 'custom',
							style: 'width:198rpx;height:160rpx;marginLeft:50rpx;background-color: #fff'
						}, {
							type: 'custom',
							style: 'width:198rpx;height:160rpx;marginLeft:50rpx;background-color: #fff'
						}, ]
					},
					30, {
						type: 'flex',
						children: [{
							type: 'line',
							num: 3,
							gap: '30rpx'
						}, {
							type: 'custom',
							style: 'width:160rpx;height:160rpx;marginLeft: 30rpx;background-color: #fff'
						}]
					},
					30, {
						type: 'flex',
						children: [{
							type: 'line',
							num: 3,
							gap: '30rpx'
						}, {
							type: 'custom',
							style: 'width:160rpx;height:160rpx;marginLeft: 30rpx;background-color: #fff'
						}]
					}
				]


			};
		},

		onLoad(options) {

			this.createdgetSystemInfo();
			// unparam转对象
			console.log('options', options)
			if (options.pid) {
				uni.setStorageSync('pid', options.pid);
			}

			let result = decodeURIComponent(options.scene ? options.scene : '');
			console.log(result, 'result')
			// 二维码扫码获取到的
			// this.options = unparam(result);
			if (result) {
				this.options.pid = result;
			}
			console.log(this.options)
			/* 当用户扫描二维码进入小程序时，统一是scene。以pid保存（在登录页面中包含） */
			if (this.options.pid) {
				uni.setStorageSync('pid', this.options.pid);
			}


			this.userInfos();
			this.system();
			this.banner()
			this.service()
			this.hotLists();
			this.kfSet()
			this.brokerageSetFn()
			this.templateSet()
			this.activitySetFn()


			setTimeout(() => {
				this.$refs.index.system();

			}, 300);

		},
		onHandle(e) {
			this.isPrivacy = e;
		},
		created() {
			uni.getSystemInfo({
				success: (res) => {
					this.windowHeight = res.windowHeight - 700;
				}
			});

		},
		onShow() {
			uni.hideTabBar({
				animation: false
			})
			this.getCateList();


			// 推荐活动
			this.recommendList()
		},

		onPageScroll(ev) {


			if (ev.scrollTop > 10) {
				let opacity = ev.scrollTop / 140

				// this.opacityStyle = opacity > 1 ? 1 : opacity
				this.opacityStyle = 1
				this.hiddenModel = false
				// this.createdgetSystemInfo();

			} else {
				this.hiddenModel = true
			}
		},
		// onPageScroll:(ev) =>{

		//    if (ev.scrollTop > 10) {
		//      let opacity = ev.scrollTop / 140
		//      console.log(opacity)
		//      this.opacity = opacity > 1 ? 1 : opacity
		// 		  this.hiddenModel =false

		//    } else {
		//       this.hiddenModel =true
		//    }
		//  },
		computed: {
			totelName: function() {
				return function(num) {
					console.log(num);
					if (num >= 10000) {
						let remainder = num % 10000;
						let quotient = Math.floor(num / 10000);
						let decimal = Math.floor(remainder / 1000);
						return quotient + '.' + decimal + '万';
					} else {
						return num.toString();
					}
				};
			}
		},
		methods: {
			change(e) {
				if (e == 1) {
					this.$sun.navSwitch('/pages/activityPgae/activity')
				} else if (e == 2) {
					this.$sun.navSwitch('/pages/partnerPromotion/promotionCenter')
				} else if (e == 3) {
					this.$sun.navSwitch('/pages/mine/mine')
				}
			},
			kfFn() {

				if (uni.getStorageSync('kfSet').kf_type == 1) {
					// 弹电话
					this.$refs.pop.show({
						anim: 'bottom',
						position: 'bottom',
						shadeClose: true, //false使用户不能点击其它关闭页面
						topclose: false,
						shade: false,
					});
				} else {
					this.$sun.kf()
				}


			},
			// 拨打电话
			call() {
				this.$sun.phone(uni.getStorageSync('kfSet').kf_phone);
			},
			// "客服联系" 取消按钮
			cancel() {
				this.$refs.pop.close();
			},
			async activitySetFn() {
				const result = await this.$http.get({
					url: this.$api.activitySet,
					data: {



					}
				});
				if (result.errno == 0) {

					console.log(result.data)

					uni.setStorageSync('activitySet', result.data);

				}
			},
			handleLogin() {
				if (this.uid) {
					return true;
				} else {
					uni.navigateTo({
						url: `/pages/login/login`
					});
				}
			},
			Allclassification() {
				this.$sun.navGo('/pages/classification/classification')
			},
			async brokerageSetFn() {
				const result = await this.$http.get({
					url: this.$api.brokerageSet,
					data: {


					}
				});
				if (result.errno == 0) {



					this.brokerageSetObj = result.data
					uni.setStorageSync('brokerageSet', result.data);
				}
			},
			isNotEmpty(value) {
				if (Array.isArray(value)) {
					return value.length > 0; // 判断数组是否有值
				} else if (typeof value === 'object' && value !== null) {
					return Object.keys(value).length > 0; // 判断对象是否有属性
				}
				return false; // 对于其他类型（包括 null 和 undefined），返回 false
			},
			async recommendList() {
				const result = await this.$http.get({
					url: this.$api.recommendList,
					data: {
						// 产品id

					}
				});
				if (result.errno == 0) {
					this.allActivity = result.data
					this.recommendBargains = result.data.bargains

					this.recommendGroupon = result.data.groupon
					this.recommendSeckill = result.data.seckill

					this.recommendBargainsBol = this.isNotEmpty(this.recommendBargains)
					this.recommendGrouponBol = this.isNotEmpty(this.recommendGroupon)
					this.recommendSeckillBol = this.isNotEmpty(this.recommendSeckill)
					
					this.timeDifference = this.formatTimeDifference(result.data.groupon.end_time)
					console.log(this.timeDifference)


					console.log(result.data)


				}
			},
			formatTimeDifference(timestamp) {
				// 获取当前时间的时间戳（以秒为单位）
				const currentTimestamp = Math.floor(Date.now() / 1000);

				// 计算时间差（以秒为单位）
				let timeDifference = timestamp - currentTimestamp;

				// 计算天数
				const days = Math.floor(timeDifference / (24 * 60 * 60));
				timeDifference %= (24 * 60 * 60);

				// 计算小时
				const hours = Math.floor(timeDifference / (60 * 60));
				timeDifference %= (60 * 60);

				// 计算分钟
				const minutes = Math.floor(timeDifference / 60);

				// 剩余的秒数
				const seconds = timeDifference % 60;

				return {
					days: days,
					hours: hours,
					minutes: minutes,
					seconds: seconds
				};
			},
			nextPage() {
				// console.log(111)
				if (this.queryPage.limit * this.queryPage.page >= this.total) {
					return this.$sun.toast('亲 没有更多了~', 'none')
				} else {
					this.queryPage.page += 1
					// this.init()
				}
			},
			createdgetSystemInfo() {
				let menuButtonObject = uni.getMenuButtonBoundingClientRect(); //获取菜单按钮（右上角胶囊按钮）的布局位置信息。坐标信息以屏幕左上角为原点。
				uni.getSystemInfo({
					//获取系统信息
					success: res => {
						let navHeight = menuButtonObject.height + (menuButtonObject.top - res
							.statusBarHeight) * 2; //导航栏高度=菜单按钮高度+（菜单按钮与顶部距离-状态栏高度）*2
						this.heightSystemss = navHeight;

					},
					fail(err) {
						console.log(err);
					}
				});
			},
			previewImage(e) {
				uni.previewImage({
					// 需要预览的图片链接列表
					urls: [],
					// 为当前显示图片的链接/索引值
					current: '/static/mp-weixin/qrCode.jpg',
					// 图片指示器样式
					indicator: 'default',
					// 是否可循环预览
					loop: false,
					// 长按图片显示操作菜单，如不填默认为保存相册
					// longPressActions:{
					// 	itemList:[this.l('发送给朋友'),this.l]
					// },
					success: res => {
						console.log('res', res);
					},
					fail: err => {
						onsole.log('err', err);
					}
				});
			},
			shareShop(i) {
				this.detailInfo = i;
				// 小程序分享 与button的open-type 使用(接口)
			},
			onShareAppMessage(res) {
				console.log(res)
				if (res.from === 'button') {
					// 来自页面内分享按钮
					// this.addShare();
					return {
						// 自定义分享标题
						title: this.detailInfo.name ? this.detailInfo.name : '佣金分享 ',
						imageUrl: this.detailInfo.pic_url,
						desc: this.detailInfo.share_pic.share_desc ? this.detailInfo.share_pic.share_desc : '分享赚佣金',
						path: '/pages/index/index?pid=' + uni.getStorageSync("uid") ? uni.getStorageSync("uid") : ''
					};
				} else {
					return {

						title: wx.getStorageSync('system').share_title ? wx.getStorageSync('system').share_title : '团源码',
						path: '/pages/index/index?pid=' + (uni.getStorageSync("uid") ? uni.getStorageSync("uid") : ''),
						imageUrl: wx.getStorageSync('system').share_pic ? wx.getStorageSync('system').share_pic : '',
						desc: wx.getStorageSync('system').share_desc ? wx.getStorageSync('system').share_desc : '邀请好友'
					}
				}


			},
			async kfSet() {
				const result = await this.$http.get({
					url: this.$api.kfSet,
					data: {
						// 产品id

					}
				});
				if (result.errno == 0) {
					uni.setStorageSync('kfSet', result.data);
					console.log(result)
				}
			},
			// 增加分享量
			async addShare() {
				const result = await this.$http.get({
					url: this.$api.addShareNumber,
					data: {
						// 产品id
						goods_id: this.id
					}
				});
				if (result.errno == 0) {}
			},
			/* api */
			// 用户信息
			async userInfos() {
				const result = await this.$http.get({
					url: this.$api.userInfo,
					data: {
						// 用户id
						uid: uni.getStorageSync('uid'),
						// 上级id
						pid: '',

					}
				});
				if (result.errno == 0) {
					uni.setStorageSync('user', result.data);

				}
			},
			// 食品获取分类
			async getCateList() {
				const result = await this.$http.get({
					url: this.$api.navigation
				});
				console.log(result.data)
				if (result.errno == 0) {
					this.classList = result.data;
					this.classList = this.classList.slice(0, 5);
					// let all = {
					// 	pic_url: '/static/all.png',
					// 	name: '全部',
					// 	type: 1
					// };
					// this.classList.push(all);
					setTimeout(() => {
						// this.loading = false
					}, 100)
				}
			},
			async banner() {
				const result = await this.$http.get({
					url: this.$api.banner
				});
				if (result.errno == 0) {
					let systemInfo = result.data;


					this.carousel = systemInfo;
					setTimeout(() => {
						this.loading = false
					}, 1000)

				}
			},
			async service() {
				const result = await this.$http.get({
					url: this.$api.service
				});
				if (result.errno == 0) {
					let systemInfo = result.data;



					if (systemInfo[0].pic_url && systemInfo[1].pic_url) {
						this.linkcss = 'v-link-img';
					} else {
						this.linkcss = 'v-not-link';
					}

					if (systemInfo[0].pic_url) {
						this.linkList.push({
							img: systemInfo[0].pic_url,
							url: systemInfo[0].url,
						});
					}
					if (systemInfo[1].pic_url) {
						this.linkList.push({
							img: systemInfo[1].pic_url,
							url: systemInfo[1].url,
						});
					}
				}
			},
			async templateSet() {
				const result = await this.$http.get({
					url: this.$api.templateSet
				});
				if (result.errno == 0) {

					// this.indexAdid = result.data.bar_app_id;
					// 系统设置:客服二维码
					// this.kfImg = systemInfo.kf_img;
					// this.distributionSet = systemInfo.distributionSet;

					uni.setStorageSync('templateSet', result.data);
				}
			},
			// 系统设置
			async system() {
				const result = await this.$http.get({
					url: this.$api.system
				});
				if (result.errno == 0) {
					let systemInfo = result.data;
					// this.indexAdid = result.data.bar_app_id;
					// 系统设置:客服二维码
					// this.kfImg = systemInfo.kf_img;
					// this.distributionSet = systemInfo.distributionSet;

					uni.setStorageSync('system', result.data);
				}
			},
			// 我的订单
			async upCallback(scroll) {
				let typeNumber = this.tabList[this.navIndex].id;
				const result = await this.$http.get({
					url: this.$api.goodsList,
					data: {
						page: scroll.num,
						psize: 10,
						// 人气热卖
						sold: this.navIndex == 1 ? 2 : '',
						// 最新发布
						create_time: this.navIndex == 0 ? 2 : '',

					}
				});
				if (result.errno == 0) {
					this.mescroll.endByPage(result.data.list.length, result.totalPage);
					if (scroll.num == 1) this.typeList = [];
					this.typeList = this.typeList.concat(result.data.list);
					// if (this.distributionSet.distribution_level != 0) {
					// 	this.getChange2(0);
					// }
				}
			},
			// 我的订单
			async hotLists() {
				const result = await this.$http.get({
					url: this.$api.goodsList,
					data: {
						page: 1,
						psize: 10,
						is_recommend: 1
					}
				});
				if (result.errno == 0) {
					this.hotList = result.data.list;
				}
			},



			/* 点击事件 */

			// "热门推荐 / 人气热卖" 分类
			getChange(e) {
				this.navIndex = e;
				this.mescroll.resetUpScroll();
			},
			// 需测试
			getChange2(e) {
				this.pid = uni.getStorageSync('pid') ? uni.getStorageSync('pid') : '';
				/* 如果商品下的 distribution_level >0 则用商品下的distribution_one，否则查询系统设置下的distribution_level，如果系统设置下的distribution_level==0则不展示佣金*/
				for (let i = 0; i < this.typeList.length; i++) {
					let radio = Number(this.typeList[i].distribution_level) > 0 ? this.typeList[i].distribution_one : this
						.distributionSet.distribution_one;
					// 商品佣金= 商品实付款 * (比例/100)
					let commission = Number(this.typeList[i].original_price * (Number(radio) / 100)).toFixed(2);
					this.typeList[i].commission = commission;
				}
			},
			// '普通商品'详情
			toDetail(id) {
				this.$sun.navGo('/pages/detail/detail', {
					goods_id: id,
					type: 0
				});
			},
			viewActivities() {
				if (this.handleLogin()) {
					this.$sun.navSwitch('/pages/activityPgae/activity');
				}

			},
			joinActivities(index, id) {
				if (this.handleLogin()) {
					this.$sun.navGo('/pages/detail/detail', {
						goods_id: id,
						type: index
					});
				}


			},

			// 搜索
			search() {
				this.$sun.navGo('/pages/index/searchPage');
				// this.$sun.navGo('/pages/customerService/customerService');
			},
			// '全部'分类 —— 跳转
			toGo(item) {
				console.log(item)
				if (item.type == 1) {
					if (item.name == '转盘抽奖') {
						if (this.handleLogin()) {
							this.$sun.navGo(item.url)
						}
					} else {
						this.$sun.navGo(item.url)

					}



					// if (item.name == '众筹专区') {
					// 	this.$sun.navGo('/pages/activityPgae/crowdFunding');
					// } else {
					// 	this.$sun.navGo('/pages/classification/classification');
					// }
				} else {
					// this.$sun.navGo('/pages/index/search', {
					// 	id: item.id,
					// 	title: item.title
					// });
				}
			},
			// 左右图片跳转路径
			imgClick(i) {
				if (this.handleLogin()) {
					if (this.brokerageSetObj.is_open != 1 && i.url == '/pages/partnerPromotion/promotionCenter') {
						this.$sun.toast('当前分销页面已关闭')

					} else {
						this.$sun.navGo(i.url);
					}
				}



			},
			// 团购专区——查看更多
			getMoreGroup() {
				this.$sun.navSwitch('/pages/group/areaActivities/areaActivities');
			},

			// 客服（0）/二维码（1） 弹框
			popClick() {
				this.$refs.popCode.show({
					anim: 'center',
					shadeClose: false, //false使用户不能点击其它关闭页面
					topclose: false
				});
			},
			popCodeClose() {
				this.$refs.popCode.close();
			}
		}
	};
</script>

<style lang="less">
	/deep/ .uv-tabbar-item__icon {
		.icon {
			width: 100rpx;
			height: 20rxp;
		}
	}

	/deep/.uv-skeleton {}


	.half-circle {
		width: 400rpx;
		/* 半圆的宽度 */
		height: 200rpx;
		/* 半圆的高度，保证是圆的一半 */
		background-color: transparent;
		border: 4rpx solid blue;
		/* 半圆的颜色 */
		border-bottom-left-radius: 200rpx;
		/* 使左上角为圆角 */
		border-bottom-right-radius: 200rpx;
		overflow: hidden;
		/* 隐藏下半部分 */
	}

	.v-pop {
		width: 750rpx;
		background-color: #ffffff;
		border-radius: 20rpx 20rpx 0 0;

		.v-pop-phone {
			width: 100%;
			border-bottom: 2rpx solid #f7f7f7;
			color: #08ba06;
			font-size: 32rpx;
			padding: 36rpx 0 32rpx;

			image {
				width: 38rpx;
				height: 38rpx;
				margin-right: 12rpx;
			}
		}

		.v-cancel {
			width: 100%;
			padding: 36rpx 0;
			color: #8f8f8f;
			font-size: 32rpx;
		}
	}

	#barTitle {
		position: fixed;
		width: 750rpx;
		top: 0;
		left: 0;
		background: #fff;
		color: #000000;
		text-align: center;
		font-weight: bold;
		z-index: 9999
	}

	#barTitle>text {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 20rpx
	}


	/deep/ button::after {
		border: none;
		margin: 0rpx;
		padding: 0rpx;
	}

	.v-home-page {
		background: linear-gradient(180.00deg, rgb(222, 233, 251), rgb(238, 240, 243) 40.653%, rgb(242, 242, 242) 100%);

		.dailyFlashSale {
			margin: 0rpx 20rpx 20rpx 20rpx;
			// margin-top: 20rpx;
			// width: 694rpx;

			border-radius: 20rpx;

			background: linear-gradient(161.71deg, rgb(241, 69, 54) -13.242%, rgb(241, 86, 54) 84.549%);
			;

			.fireImg {
				width: 40.74rpx;
				height: 44.86rpx;
			}

			.fireSell {
				width: 148rpx;
				height: 38rpx;
			}

			.dailyFlashSaleList {
				margin: 0 20rpx;

				.iconFont {
					width: 150rpx;
					height: 35rpx;
				}

				.activeBtn {
					color: #fff;
					width: 128rpx;
					height: 60rpx;
					border-radius: 136rpx;

					background: rgb(239, 60, 46);
				}

				.joinGroupBtn {
					border-radius: 12rpx;
					color: #fff;
					background: rgb(239, 60, 46);
					width: 90rpx;
					height: 50rpx;
				}

				.imgShrare {
					width: 14.42rpx;
					height: 19.98rpx;
				}

				.dailyFlashSaleContainer {
					position: relative;


					.dailyFlashSaleImg {
						// position: absolute;
						top: 0;
						left: 0;
						border-radius: 10rpx;
						width: 192rpx;
						height: 217rpx;

					}

					.text {
						position: absolute;
						width: 78rpx;
						height: 40rpx;
						background: rgb(254, 66, 68);
						color: #fff;
						top: 0;
						z-index: 899;
					}

					.trafficText {
						position: absolute;
						// width: 78rpx;
						padding: 0 15rpx;
						height: 40rpx;
						background: rgb(229, 94, 43);
						color: #fff;
						top: 0;
						z-index: 899;
					}

					.triangleText {
						/* path */
						position: absolute;
						width: 117rpx;
						height: 43rpx;

						// width: 78rpx;
						// padding: 0 30rpx;
						// width: 0;
						// height: 0;
						// border-right: 90rpx solid transparent;

						// border-bottom: 90rpx solid rgb(229, 94, 43);
						// transform: rotate(90deg); // background: rgb(229, 94, 43);
						// color: #fff;
						top: -3rpx;
						z-index: 8;
						left: 0rpx;

						.tgIcon {}

						text {
							position: absolute;
							left: 22rpx;
							top: 32rpx;
							transform: rotate(135deg);
							font-size: 22rpx;
						}
					}
				}



				.economize {
					/* 矩形 1707 */

					padding: 5rpx 8rpx 5rpx 5rpx;


					box-sizing: content-box;
					border: 2rpx solid rgb(253, 31, 43);
					border-radius: 20rpx 40rpx 40rpx 0rpx;

					background: rgb(255, 244, 242);
					margin-right: 10rpx;
				}

				.rob {
					width: 300rpx;
					height: 56rpx;
					border-radius: 20rpx;

					// background: rgb(255, 244, 242);
				}


			}
		}

		.search-content {

			background: #00000048;
			margin: 20rpx;
			margin-bottom: 40rpx;
			width: 500rpx;
			height: 72rpx;
			border-radius: 134rpx;

			image {
				width: 30rpx;
				height: 30rpx;
				margin-right: 10rpx;
			}

			view {
				color: #fff;
			}

		}

		.popularRecommendations {
			width: 710rpx;
			height: 486rpx;
			padding: 8rpx;
			border-radius: 20rpx;
			margin-left: 20rpx;

			background: linear-gradient(161.71deg, rgb(65, 139, 246) -9.617%, rgb(190, 159, 235) 72.199%);

			.v-titles {
				font-size: 32rpx;
				font-weight: bold;
				padding: 20rpx 0 20rpx 20rpx;
				font-family: 优设标题黑;
			}

			.scroll-Y {
				height: 300rpx;
			}

			.scroll-view_H {
				white-space: nowrap;
				width: 100%;
				height: 105%;

			}

			.v-m-tops {
				// margin-top: 32rpx;

				.v-commoditys {

					width: 342rpx;
					height: 100%;


					// margin: 0 0 40rpx 20rpx;
					// padding: 0 20rpx;

					.imgPopular {

						width: 230rpx;
						height: 362rpx;
						position: relative;

						z-index: 999;

						.gradient {
							width: 230rpx;
							height: 200rpx;
							position: absolute;
							top: 187rpx;
							z-index: 99;
							border-radius: 20rpx;
							background: (var(--bg-image));

							// background：: linear-gradient(180.00deg, rgba(133, 102, 240, 0) -3.5%,rgb(133, 102, 240) 46%);
							.buyBt {
								width: 132rpx;
								height: 42rpx;
								border-radius: 110rpx;

								background: rgb(255, 255, 255);
							}
						}

						image {
							position: absolute;
							// margin-bottom: 24rpx;
							margin-bottom: 10rpx;
							width: 342rpx;
							height: 342rpx;
						}

						.v-commission {
							margin-top: 12rpx;

							view {
								color: #ff5f4e;
								font-size: 24rpx;
								padding: 8rpx 16rpx;
								background: #ffe4e1;
								border: 2rpx solid #ff5f4e;
							}
						}

						.v-sale {
							padding: 20rpx 0;
							color: #8f8f8f;
							font-size: 24rpx;

							view {
								color: #8f8f8f;
								font-size: 24rpx;
								// margin-left: 16rpx;
							}
						}

						.v-price {
							color: #ff5f4e;
							font-weight: bold;

							text {
								font-size: 36rpx;
							}
						}

						.v-price2 {
							font-size: 24rpx;
							margin-top: 4rpx;
							color: #ff5f4e;
							font-weight: bold;

							text {
								font-size: 30rpx;
							}
						}

						.v-btn-shareing {
							padding: 0;
							width: 142rpx;
							height: 44rpx;
							background: #fff7d1;
							border-radius: 100rpx;
						}

						.v-shareing {
							padding: 6rpx 16rpx;
							background: #fff7d1;
							border-radius: 100rpx;


							text {

								color: #fe9a31;
								font-size: 20rpx;
							}

							view {

								color: #fe9a31;
								font-size: 20rpx;
								padding-left: 6rpx;
							}
						}
					}

				}
			}
		}

		.classContianer {
			background-color: #fff;
			margin: 30rpx 25rpx 0rpx;
			border-radius: 20rpx;

			.v-class {
				width: calc(100% / 5);
				padding: 30rpx 0 30rpx;


				image {
					// margin-top: 48rpx;
					width: 64rpx;
					height: 64rpx;
				}

				text {
					font-size: 24rpx;
					color: #333333;
					margin-top: 24rpx;
				}
			}
		}

		.i-cover {
			width: 710rpx;
			height: 280rpx;
			border-radius: 20rpx;
			margin: 0 20rpx;
		}

		.i-cover-img {
			width: 710rpx;
			height: 280rpx;
			border-radius: 20rpx;
		}

		.v-not-link {
			margin: 66rpx 26rpx 0;
		}

		.v-link-img {
			margin: 30rpx 25rpx;
		}

		.v-link-img,
		.v-not-link {
			image {
				width: 340rpx;
				height: 170rpx;
				border-radius: 10rpx;
			}
		}

		.v-group-title {
			padding: 0 26rpx 24rpx 28rpx;

			view {
				font-size: 32rpx;
				font-weight: 900;
			}

			text {
				color: #8f8f8f;
			}
		}

		// 热门推荐
		.v-title {
			font-size: 32rpx;
			font-weight: bold;
			margin: 0 0 28rpx 28rpx;
		}

		.v-titless {
			width: 150rpx;
			height: 35rpx;
			margin: 20rpx 0 20rpx 10rpx;
		}

		.v-m-top {
			margin-top: 32rpx;

			.v-commodityss {
				width: 342rpx;

				margin: 0 0 40rpx 10rpx;

				border-radius: 0rpx 0rpx 20rpx 20rpx;

				image {
					// margin-bottom: 24rpx;
					margin-bottom: 10rpx;
					width: 342rpx;
					height: 342rpx;
				}

				.v-commission {
					margin-top: 12rpx;

					view {
						color: #ff5f4e;
						font-size: 24rpx;
						padding: 8rpx 16rpx;
						background: #ffe4e1;
						border: 2rpx solid #ff5f4e;
					}
				}

				.v-sale {
					padding: 20rpx 0;
					color: #8f8f8f;
					font-size: 24rpx;

					view {
						color: #8f8f8f;
						font-size: 24rpx;
						// margin-left: 16rpx;
					}
				}

				.v-price {
					color: #ff5f4e;
					font-weight: bold;

					text {
						font-size: 36rpx;
					}
				}

				.v-price2 {
					font-size: 24rpx;
					margin-top: 4rpx;
					color: #ff5f4e;
					font-weight: bold;

					text {
						font-size: 30rpx;
					}
				}

				.v-btn-shareing {
					margin-top: 20rpx;
					padding: 0;

					height: 44rpx;
					background: #fff7d1;
					border-radius: 100rpx;
				}

				.v-shareing {

					padding: 6rpx 16rpx;
					background: #fff7d1;
					border-radius: 100rpx;
					height: 44rpx;


					text {
						height: 44rpx;
						color: #fe9a31;

						font-size: 20rpx;
						margin-right: 10rpx;
					}

					view {
						height: 44rpx;
						color: #fe9a31;
						font-size: 20rpx;
						padding-left: 6rpx;
					}
				}
			}

			.v-commodity {
				width: 342rpx;
				height: 580rpx;
				margin: 0 0 40rpx 20rpx;
				background-color: #fff;
				border-radius: 0rpx 0rpx 20rpx 20rpx;

				image {
					// margin-bottom: 24rpx;
					margin-bottom: 10rpx;
					width: 342rpx;
					height: 342rpx;
				}

				.v-commission {
					margin-top: 12rpx;

					view {
						color: #ff5f4e;
						font-size: 24rpx;
						padding: 8rpx 16rpx;
						background: #ffe4e1;
						border: 2rpx solid #ff5f4e;
					}
				}

				.v-sale {
					padding: 20rpx 0;
					color: #8f8f8f;
					font-size: 24rpx;

					view {
						color: #8f8f8f;
						font-size: 24rpx;
						// margin-left: 16rpx;
					}
				}

				.v-price {
					color: #ff5f4e;
					font-weight: bold;

					text {
						font-size: 36rpx;
					}
				}

				.v-price2 {
					font-size: 24rpx;
					margin-top: 4rpx;
					color: #ff5f4e;
					font-weight: bold;

					text {
						font-size: 30rpx;
					}
				}

				.v-btn-shareing {
					margin-top: 20rpx;
					padding: 0;

					height: 44rpx;
					background: #fff7d1;
					border-radius: 100rpx;
				}

				.v-shareing {

					padding: 6rpx 16rpx;
					background: #fff7d1;
					border-radius: 100rpx;
					height: 44rpx;


					text {
						height: 44rpx;
						color: #fe9a31;

						font-size: 20rpx;
						margin-right: 10rpx;
					}

					view {
						height: 44rpx;
						color: #fe9a31;
						font-size: 20rpx;
						padding-left: 6rpx;
					}
				}
			}
		}

		.v-fixed {
			z-index: 999;
			position: fixed;
			bottom: 190rpx;
			right: 48rpx;

			.v-icon,
			.v-icon2 {
				margin-bottom: 24rpx;
				width: 100rpx;
				height: 100rpx;
				z-index: 9999;
				background-color: #ffffff;
				border-radius: 50%;
				box-shadow: 0 0 8rpx rgba(0, 0, 0, 0.1);

				image {
					width: 38rpx;
					height: 38rpx;
				}
			}

			.v-icon {
				view {
					color: #294d7d;
					font-size: 24rpx;
				}
			}

			.v-icon2 {
				view {
					margin-top: 6rpx;
					color: #294d7d;
					font-size: 24rpx;
				}
			}
		}

		// 二维码
		.v-pop-code {
			.v-qr-code {
				padding: 42rpx 0 56rpx;
				background: #ffffff;
				border-radius: 10rpx;
				width: 526rpx;

				image {
					width: 380rpx;
					height: 380rpx;
				}

				text {
					margin-top: 26rpx;
				}
			}

			.v-close-img {
				width: 82rpx;
				height: 82rpx;
				margin-top: 46rpx;
			}
		}
	}
</style>